home *** CD-ROM | disk | FTP | other *** search
- rem [
- rem Name: u.copywinf.bat
- rem
- rem Derived from: (original)
- rem
- rem Author: Clive Standbridge
- rem
- rem Created on: Nov 1996
- rem
- rem Sccs ID: @(#)u.copywinf.bat 1.4 05/07/97
- rem
- rem Coding Stds: 3.0
- rem
- rem Purpose: To copy files to the appropriate directory when
- rem upgrading a split Windows 3.1 setup.
- rem
- rem Parameters: 1 Directory containing files to be copied
- rem 2 FSA directory for split Windows setup.
- rem = c:\windows for hard disk only setup.
- rem
- rem Copyright 1997 Insignia Solutions PLC. All rights reserved.
- rem ]
-
- rem Sanity check source directory
- if not exist %1\nul goto end
-
- rem Change drive and directory to find source files
- rem (the set commands allocate env. space)
- set copywinf_drive=__
- set copywinf_colon=_
- ibatch copywinf_drive string %1 0 2
- ibatch copywinf_colon string %1 1 1
- if "%copywinf_colon%" == ":" %copywinf_drive%
- cd %1
-
- rem Skip if not a split setup
- rem Get (possibly FSA) Windows directory in known case and test it
- rem (the set command allocates env. space)
- set copywinf_windir=%2
- ibatch copywinf_windir tolower %2
- if "%copywinf_windir%" == "c:\windows" goto c_only
-
- rem ===========
- rem Split setup
- rem ===========
- rem Update existing files in the FSA directory
- for %%f in (*.*) do if exist %2\%%f copy %%f %2 /Y >>c:\insignia\up.log
-
- rem Update existing files in the c:\windows directory
- for %%f in (*.*) do if exist c:\windows\%%f copy %%f c:\windows /Y >>c:\insignia\up.log
-
- rem Copy new files to the c:\windows directory
- for %%f in (*.*) do if NOT exist c:\windows\%%f if NOT exist %2\%%f copy %%f c:\windows /Y >>c:\insignia\up.log
-
- goto end
-
- :c_only
- rem ========================================
- rem Hard disk only setup - this case is easy
- rem ========================================
- if exist *.* copy *.* %2 /Y >>c:\insignia\up.log
- goto end
-
- :end